{% extends "layout.html" %}

{% block main %}

<ol class="breadcrumb">
    <li><a href="#">管理首页</a></li>
    <li><a href="#">修改博文</a></li>
</ol>

<form role="form" method="post" style="font-size: 22px;text-align: center">
    <div class="form-group">
        <label for="name">博文标题</label>
        <input type="text" class="form-control" name="name" id="name" value="{{info.Title}}">
    </div>

    <div class="form-group">
        <label for="category">请选择分类</label>
        <select name="category" id="category" class="form-control">
            {% for category in categories %}
                {% if info.Category == category.Name %}
                    <option value="{{category.Name}}" selected>{{category.Name}}</option>
                {% else %}}
                    <option value="{{category.Name}}" >{{category.Name}}</option>
                {% endif %}
            {% endfor %}
        </select>

        <div class="form-group" style="margin-top: 20px;font-size: 20px;">
            <label for="description">请填写简介</label>
            <textarea name="description" id="description" class="form-control" rows="4"
                      style="overflow: auto;">{{info.Description}}</textarea>
        </div>

        <div class="form-group" style="margin-top: 20px;font-size: 20px;">
            <label for="content">请填写正文</label>
            <textarea name="content" id="content" class="form-control" rows="15"
                      placeholder="请输入内容">{{info.Composition}}</textarea>
        </div>

    </div>
    <button type="submit" class="btn btn-primary btn-lg" style="margin-top: 50px;">提交修改</button>
</form>

{% endblock %}